package part15;

import java.util.ArrayList;
import java.util.List;

/**
 * @author wcj
 * @Date 2021/5/30 16:38
 * @Version 1.0
 */
public class Part1526 {

    static List list1;
    static List<?> list2;
    static List<? extends Object> list3;

    static void assign1(List list) {
        list1 = list;
        list2 = list;
        list3 = list;
    }

    static void assign2(List<?> list) {
        list1 = list;
        list2 = list;
        list3 = list;
    }

    static void assign3(List<? extends Object> list) {
        list1 = list;
        list2 = list;
        list3 = list;
    }

    /**
     * <?>无界通配符，代表任何类型</>
     *
     * @param args
     */
    public static void main(String[] args) {
        assign1(new ArrayList());
        assign2(new ArrayList<>());
        assign3(new ArrayList<>());
        assign1(new ArrayList<String>());
        assign2(new ArrayList<String>());
        assign3(new ArrayList<String>());
    }
}
